package com.baseframe.system.controller;


import com.baseframe.system.entity.vo.BaseNoticeVO;
import com.baseframe.system.service.BaseNoticeService;
import com.baseframe.tool.result.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/front/notice")
@AllArgsConstructor
public class FrontBaseNoticeController {

    private BaseNoticeService baseNoticeService;


    /**
     * 获取最新的公告 5条
     * @return R
     */
    @GetMapping("/get/new/list")
    public R<Object> getNoticeList(){

        return R.data(baseNoticeService.getNoticeByNew());
    }

}
